window.onload = function () {
    function test() {
        alert('恭喜你被劝退')
        test()
    }
    document.querySelector('header').onclick = function () {
        alert('恭喜你被劝退')
        while (true) {
            alert('恭喜你被劝退')
        }
       
    }
    document.querySelector('.Captain_Tom').onclick = function () {

        alert('呼叫CaptainTom')
        test()
        alert('呼叫CaptainTom')
    }

    document.querySelector('button').onclick = function () {
        console.log('halo');
        this.classList.toggle('active')
        test()
    }
    document.querySelector('.add').onclick = function () {
        alert('game over');
    }
    document.querySelector('.hf').onclick = function () {
        alert('hf')
    }

}



